#!/bin/bash

# export GOPATH=$GOPATH':/home/jkkkls/work/goxiang/Common:/home/jkkkls/work/goxiang/Gate'
export GOPATH=$GOPATH':/root/git-osc/goxiang/Common:/root/git-osc/goxiang/Gate'
echo $GOPATH

go build ./src/GtEngine
go install ./src/GtEngine

go build ./src/GtDB
go install ./src/GtDB

go build ./

echo "install ==============>"
mkdir -p ./bin/Gate1
mkdir -p ./bin/Gate2
mkdir -p ./bin/Gate1/log
mkdir -p ./bin/Gate2/log
cp ./Gate ./bin/Gate1/Gate1
cp ./Gate ./bin/Gate2/Gate2
cp ./config.json ./bin/Gate1
cp ./config.json ./bin/Gate2

rm -rf ./bin/Gate1/log/*
rm -rf ./bin/Gate2/log/*
